package cn.bellychang.ood.ocp.good;

/**
 * @author ChangLiang
 * @date 2020/5/12
 */
public class FormatterFactory {

    public static Formatter createFormatter(int type) {
        if (type == 1) {
            return new RawFormatter();
        }
        if (type == 2) {
            return new RawWithDateFormatter();
        }
        throw new RuntimeException("formatter type: " + type + " not support currently");
    }
}
